using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Yongcontrol : MonoBehaviour
{
    public int times;
    //PlayerAttack attack;
    GameObject attack;
    Collider2D attackcollider;
    //public AnimatorController armAnimator;
    // Start is called before the first frame update
    void YongIn1()
    {
        if (times < 10)
        {
            attackcollider.enabled = true;
        }
        
        
    }
    void YongIn2()
    {
        if (times < 10)
        {
            attackcollider.enabled = true;
        }
        
    }
    void YongOut1()
    {
        attackcollider.enabled = false;
        times++;
        Debug.Log("yong"+times);
    }
    void YongOut2()
    {
        attackcollider.enabled = false;
        times++;
        Debug.Log("yong"+times);
    }
    void Start()
    {
        times = 0;
        //attack = GetComponentInChildren<PlayerAttack>();
        attack = GameObject.FindWithTag("Attack");
        attackcollider=attack.GetComponent<PolygonCollider2D>();
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
